<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
<link rel="stylesheet" href="../../../javascript/plug-ins/layui/css/layui.css" media="all" />
<link rel="stylesheet" href="../../../css/style.css" />		
<script src="../../../javascript/jquery.js"></script>
		<script src="../../../javascript/plug-ins/echarts.min.js"></script>




	</head>
	<body>
		
	   <div class="page-wrap">		
		
		<section class="page-hd t">         
         <header>
			 <h5 class="title">
			 <a href="distbut_mangt.html">分销商管理</a>
			 <!--<a href="trend_statist.html" class="red">增长趋势统计</a>		
			 <a href="distbut_order.html">分销订单</a>
			 <a href="distbut_statist.html">分销商统计</a>
			 <a href="distbut_between.html">分销商关系</a>-->
			 <a href="withdrawal.html">提现</a>
			</h5>	
		 </header>
		 <hr>
		</section>
		
		
		<div class="panel panel-default">
		
		
		     <div class="flex flex-wrap text-right">
		       <select onchange="recharge()" id="search_type" class="width10 float_right margin_left80b"><option value="thisday">今日</option><option value="thisweek">本周</option><option value="thismonth">本月</option><option value="thisyear">本年</option><option value="thisall">全部数据</option></select>
		    </div>
		    
		    <div id="main" style="width: 99%;height:600px;"></div>
		

		</div><!---panel--->
			
	   </div><!---page-wrap------>		
		
		
	</body>
	
 <script type="text/javascript">
        // 基于准备好的dom，初始化echarts实例
        var myChart = echarts.init(document.getElementById('main'));

        // 指定图表的配置项和数据
        var option = {
            title: {
                text: '趋势图示例'
            },
            tooltip: {},
            legend: {
                data:['人数']
            },
//          xAxis: {
//              data: ["1","2","3","4","6","6","7","8","9","10","11","12"]
//          },
            yAxis: {
            	 title: {
                  text: '万'
                 },
            }
            
        };
        
        var canshu1=[{
                name: '人数',
                type: 'line',
                data: [20]
            }];
        
        var canshu2=[{
                name: '人数',
                type: 'line',
                data: [50, 20, 36, 10, 10,20,23]
            }];
        
        var canshu3=[{
                name: '人数',
                type: 'line',
                data: [5, 20, 36, 10, 10, 20,23,78,52,65,44,25,5, 20, 36, 10, 10, 20,23,78,52,65,44,25,5, 20, 36, 10, 10, 20]
            }];
                    
        var canshu4=[{
                name: '人数',
                type: 'line',
                data: [50, 20, 36, 10, 10,20,23,45,50, 20, 36, 10]
            }];    
            
        var canshu5=[{
                name: '人数',
                type: 'line',
                data: [500, 200, 360, 100, 100,200,230,454]
            }];        
        
            
        var recharges=$("#search_type").find("option:selected").val(); 
        if(recharges=='thisday'){
            option.xAxis={data: ["今日"]};
           	option.series=canshu1;     
        }else if(recharges=='thisweek'){
        	option.xAxis={data: ["周一","周二","周三","周四","周五","周六","周七"]};
        	option.series=canshu2;        	
        }else if(recharges=='thismonth'){
        	option.xAxis={data: ["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30"]};
        	option.series=canshu3;  
        }else if(recharges=='thisyear'){
        	option.xAxis={data: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]};
        	option.series=canshu4;
        }else if(recharges=='thisall'){
        	option.xAxis={data: ["2010年","2011年","2012年","2013年","2014年","2015年","2016年","2017年"]};
        	option.series=canshu5;
        }
                    
        // 使用刚指定的配置项和数据显示图表。
        myChart.setOption(option);
        
        function recharge(){
        	
           var recharges=$("#search_type").find("option:selected").val(); 
           if(recharges=='thisday'){
            option.xAxis={data: ["今日"]};
           	option.series=canshu1;     
           }else if(recharges=='thisweek'){
        	option.xAxis={data: ["周一","周二","周三","周四","周五","周六","周七"]};
        	option.series=canshu2;        	
           }else if(recharges=='thismonth'){
        	option.xAxis={data: ["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30"]};
        	option.series=canshu3;  
           }else if(recharges=='thisyear'){
        	option.xAxis={data: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]};
        	option.series=canshu4;
           }else if(recharges=='thisall'){
        	option.xAxis={data: ["2010年","2011年","2012年","2013年","2014年","2015年","2016年","2017年"]};
        	option.series=canshu5;
           }
           
          // 使用刚指定的配置项和数据显示图表。
          myChart.setOption(option);
          
        }

    
	</script>		
	
</html>
